<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Controle</title>
        <link type="text/css" rel="stylesheet" href="/resources/css/default.css"/>
        <script type="text/javascript" src="/resources/js/jquery-1.8.0.min.js"/>
    </h:head>
    <h:body style="font-size: 10px; min-width: 800px">
        <h:form id="frmPrincipal">
            <p:menubar>
                <p:menuitem value="Home" action="#{indexBean.loadIndex()}"
                            update=":frmPrincipal" process="@all"/>
                <p:submenu label="Cadastros">
                    <p:menuitem value="Cidades" actionListener="#{indexBean.loadCidade()}" 
                                update=":frmPrincipal" process="@all"/>
                    <p:menuitem value="Pessoas" actionListener="#{indexBean.loadPessoa()}" 
                                update=":frmPrincipal" process="@all"/>
                </p:submenu>
            </p:menubar>
            <h:panelGroup>
                <ui:include src="#{indexBean.formAtual}"/>
            </h:panelGroup>
        </h:form>
    </h:body>
</html>

